package com.qujia.station.mapper;

import com.qujia.station.domain.StationOillGun;
import com.qujia.station.domain.dto.StationOilGunDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 油枪信息Mapper接口
 *
 * @author qujia
 * @date 2021-10-24
 */
@Mapper
public interface StationOillGunMapper
{
    /**
     * 查询油枪信息
     *
     * @param gunId 油枪信息
     * @return 油品信息
     */
    public StationOillGun selectStationOillGunById(Long gunId);

    /**
     * 查询油枪信息列表
     *
     * @param stationOillGun 油枪信息
     * @return 油枪信息集合
     */
    public List<StationOillGun> selectStationOillGunList(StationOillGun stationOillGun);

    /**
     * 新增油枪信息
     *
     * @param stationOillGun 油枪信息
     * @return 结果
     */
    public int insertStationOillGun(StationOillGun stationOillGun);

    /**
     * 修改油枪信息
     *
     * @param stationOillGun 油枪信息
     * @return 结果
     */
    public int updateStationOillGun(StationOillGun stationOillGun);

    public int updateStationOillGunTime(StationOillGun stationOillGun);

    /**
     * 删除油枪信息
     *
     * @param gunId 油枪信息ID
     * @return 结果
     */
    public int deleteStationOillGunById(Long gunId);

    /**
     * 批量删除油枪信息
     *
     * @param gunIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteStationOillGunByIds(Long[] gunIds);


    public List<StationOillGun> queryStationOillGunforEffectDate();

    public int updateStationOillGuntoTemp(StationOillGun stationOillGun);

    public StationOillGun selectStationOillGunTempById(Long gunId);

    public int insertStationOillGunTemp(StationOillGun stationOillGun);

    public List<Long> queryStationIdByEnterpriseId(Long enterpriseId);

    public void updataEffectData(StationOillGun stationOillGun);

    List<StationOillGun> selectByIdAndEnterpriseId(@Param("oilId") Long oilId, @Param("enterpriseId") Long enterpriseId);

    /**获取油枪信息*/
    StationOilGunDto selectStaGunInfo(StationOilGunDto  stationOilGunDto);

    List<StationOillGun> selectByIdAndStationId(@Param("oilId") Long oilId, @Param("stationId") Long stationId);

    List<StationOilGunDto> selectStaGunInfoByStationId(StationOilGunDto  stationOilGunDto);

    int updateStationOillGunByStationId(StationOillGun stationOillGun);
}
